package com.trkj.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.trkj.service.CountAttendanceService;

@Controller
public class CountAttendanceController {
	@Autowired
	CountAttendanceService countAttendanceService;
	
	
	@GetMapping("/CountAttendances")
	public String CountAttendances() {
		return "CountAttendances";
	}
	
	@RequestMapping("/CountAttendanceInfo")
	@ResponseBody
	public List<Map<String, Object>> CountAttendanceInfo(Integer empId) {
		return countAttendanceService.countAttendanceInfo(empId);
	}
	
	/**
	 * 传输员工表中的员工信息
	 * @author csj
	 * @return 
	 * @return
	 */
	@RequestMapping("/combobox_emp")
	public @ResponseBody List<Map<String, Object>> findAll_emp() {
		return countAttendanceService.findAll_emp_combobox();
	}
	
	@RequestMapping("/countDeptEmpInfo")
	@ResponseBody
	public Map<String, List<Object>> countDeptEmpInfo() {
		return countAttendanceService.findCountdeptEmpInfo();
	}
	
}
